package com.wmh.baseservice.system.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-08-02
 */
@ApiModel(value="SysRedEnvelope对象", description="系统红包表")
public class SysRedEnvelope implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "0：未接收 1：已接收 -1：已退回")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "发送人id")
    private Long sendId;

    @ApiModelProperty(value = "0商家 1用户")
    private Integer sendType;

    @ApiModelProperty(value = "红包金额")
    private BigDecimal money;

    @ApiModelProperty(value = "接收人id")
    private Long receiveId;

    public Long getId() {
        return id;
    }

    public SysRedEnvelope setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public SysRedEnvelope setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public SysRedEnvelope setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public SysRedEnvelope setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public SysRedEnvelope setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public SysRedEnvelope setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Long getSendId() {
        return sendId;
    }

    public SysRedEnvelope setSendId(Long sendId) {
        this.sendId = sendId;
        return this;
    }
    public Integer getSendType() {
        return sendType;
    }

    public SysRedEnvelope setSendType(Integer sendType) {
        this.sendType = sendType;
        return this;
    }
    public BigDecimal getMoney() {
        return money;
    }

    public SysRedEnvelope setMoney(BigDecimal money) {
        this.money = money;
        return this;
    }
    public Long getReceiveId() {
        return receiveId;
    }

    public SysRedEnvelope setReceiveId(Long receiveId) {
        this.receiveId = receiveId;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String SEND_ID = "send_id";

    public static final String SEND_TYPE = "send_type";

    public static final String MONEY = "money";

    public static final String RECEIVE_ID = "receive_id";

    @Override
    public String toString() {
        return "SysRedEnvelope{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", sendId=" + sendId +
            ", sendType=" + sendType +
            ", money=" + money +
            ", receiveId=" + receiveId +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            SysRedEnvelope.ID
            ,SysRedEnvelope.STATUS
            ,SysRedEnvelope.REMARK
            ,SysRedEnvelope.VERSION
            ,SysRedEnvelope.CREATE_TIME
            ,SysRedEnvelope.UPDATE_TIME
            ,SysRedEnvelope.SEND_ID
            ,SysRedEnvelope.SEND_TYPE
            ,SysRedEnvelope.MONEY
            ,SysRedEnvelope.RECEIVE_ID
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}